import random
from time import sleep
import uiautomation
import pyautogui
import pywinauto
class fuwudengji_chaxun():
    his = uiautomation.WindowControl(searchDepth=1, Name='科玛奇医院信息管理系统')  # 锁定窗口
    zidingyi = his.CustomControl(ClassName='FuWuDengJiList')
    chaxun = zidingyi.ButtonControl(AutomationId='btnSearch', ClassName='Button',Name='查询')
    quxiao = zidingyi.ButtonControl(ClassName='Button',Name='取消')
    xiugai = zidingyi.ButtonControl(ClassName='Button',Name='修改')
    name = his.DataGridControl(AutomationId='gridJMFWDJ', ClassName='YDataGrid').DataItemControl(ClassName='DataGridRow',Name='Ksy.ChssClient.Access.Model.SQ_JMFWDJ',foundIndex=1).CustomControl(ClassName='DataGridCell',foundIndex=5)

    def click_cx_btn(self):
        self.chaxun.Click()
